package com.lvmama.pangolin.timer;


import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;


/**
 * 
 * @ClassName: CommonJob
 * @Description: TODO
 * @author yuanchi
 * @date 2017年1月17日 上午11:18:04
 */

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public abstract class CommonJob implements Job 
{
	public void execute(JobExecutionContext context)
			throws JobExecutionException 
	{
		String param = (String) context.getJobDetail().getJobDataMap()
				.get("param");

		runJob(context, param);
	}

	public abstract void runJob(JobExecutionContext context, String parameter);
}
